<#include "/tags/activityItemTag.ftl">
<#macro activities>
	<#if data.activities??>
	<#assign username=""/>
	<#if data.userInSession??>
		<#assign username=data.userInSession/>
	<#elseif data.username??>
		<#assign username=data.username/>
	</#if>
	<#assign exceptForMe="no"/>
	<div id="activities" rel="${username}">
		<div class="question">
        	<h1>Hoạt động gần đây</h1>
      	</div>
      	<div id="aboutme">
        	<div class="top"></div>
        	<div class="middle recentlyActivity">
	        	<ul id="activitiesBox" rel="${exceptForMe}">
	            	<#list data.activities as activity>
						<@activityItem ownerAction=activity.componentOwnerName 
									   ownerComponent=activity.actionOwnerName
									   action=activity.action
									   component=activity.component 
									   componentId=activity.componentId 
									   updatedMinutes=activity.updatedSince
								 	   ownerActionAvatar=activity.actionOwnerAvatar 
								 	   componentTitle=activity.componentTitle
								 	   updateDate=activity.updateDate/>
					</#list>
	            </ul>
	            <div class="loading" style="display:none;">
                	<center><img src='/images/loader.gif'/></center>
                </div>
            	<#if data.activities?size == 0>
            	<p style="padding-top: 10px; padding-bottom: 10px">Hiện tại chưa có hoạt nào diễn ra</p>
            	<#else>
            	<a href="#" id="next_page" style="color:#666;font-size:11px;">XEM TIẾP</a>
            	</#if>
        	</div>
        	<div class="buttom"> </div>
      	</div>		
     </div>
	</#if>
</#macro>